using System.Configuration;
using AndyPike.Unfuddle.Contracts;
using AndyPike.Unfuddle.Services;
using NUnit.Framework;

namespace AndyPike.Unfuddle.Tests.Integration
{
    [TestFixture, Category("Integration")]
    public class IntegrationTestBase
    {
        protected string subdomain;
        protected string username;
        protected string password;
        protected int projectId;
        protected int ticketId;
        protected IUnfuddleService unfuddleService;

        [SetUp]
        public void SetUp()
        {
            subdomain = ConfigurationManager.AppSettings["subdomain"];
            username = ConfigurationManager.AppSettings["username"];
            password = ConfigurationManager.AppSettings["password"];
            projectId = int.Parse(ConfigurationManager.AppSettings["projectId"]);
            ticketId = int.Parse(ConfigurationManager.AppSettings["ticketId"]);

            unfuddleService = new XmlUnfuddleService(false, subdomain, username, password);
        }
    }
}